import api from '../utils/api';

export async function qryDepts() {
  return api.post('/sys/user/qryDepts');
}

export async function qryUserByParams(param) {
  return api.post('/sys/user/qryUsers', {
    data: JSON.stringify(param),
  });
}

export async function qryUserByDept(param) {
  return api.post('/sys/user/qryUserByDept', {
    data: JSON.stringify(param),
  });
}

export async function qryAllUser() {
  return api.post('/sys/user/qryAllUser');
}

export async function qryRoles(param) {
  return api.post('/sys/user/qryRoles',{
    data: JSON.stringify(param),
  });
}

export async function create(param) {
  return api.post('/sys/user/create',{
    data: JSON.stringify(param),
  });
}

export async function edit(param) {
  return api.post('/sys/user/edit',{
    data: JSON.stringify(param),
  });
}


export async function remove(param) {
  return api.post('/sys/user/remove', {
    data: JSON.stringify(param),
  });
}


export async function qryUserById(param) {
  return api.post('/sys/user/qryUserById', {
    data: JSON.stringify(param),
  });
}
